package cn.itcast.quartz.job;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

import cn.itcast.quartz.service.HelloService;

public class HelloJob implements Job {
	
//	public HelloJob() {
//		System.out.println("产生实例");
//	}

	@Autowired
	private HelloService helloService;

	public void execute(JobExecutionContext context)
			throws JobExecutionException {
		System.out.println("helloService="+helloService);
		System.out.println("HelloJob execute...");
		helloService.sayHello();
	}

}
